package cn.edu.scau.cmi.houzhicong.abstractFactoryPattern.factory;

import cn.edu.scau.cmi.houzhicong.abstractFactoryPattern.domain.Insurance;
import javafx.scene.image.Image;

public abstract class AbstractFactory {

    public static AbstractFactory getFactory(String factoryName){
        if(factoryName.equals("PICC")){
            return new PICCFactory();
        }else if(factoryName.equals("PingAn")){
            return new PingAnFactory();
        }else{
            return null;
        }
    }


    public abstract Insurance createBodyInjury(String name, String stuNum, Image image) ;
    public abstract Insurance createCasualty(String name, String stuNum, Image image) ;
    public abstract Insurance createCarDamage(String name, String stuNum, Image image) ;
    public abstract Insurance createMultipleAccidents(String name, String stuNum, Image image) ;

}
